package com.shoubei.cashiedesk.serialPort;


import org.greenrobot.greendao.annotation.Id;

import java.io.Serializable;

/**
 * @author
 * @version 创建时间：2018年11月14日 下午5:03:30 类说明 打印机类型,串口
 */
public class PrintAndKexianDevice implements Serializable {

	/**
	 * 2016年11月14日
	 */
	private static final long serialVersionUID = 1896666063279428094L;
	/**
	 * 打印机设置
	 */
	public static final int type_print = 100;
	/**
	 * 客显设置
	 */
	public static final int type_kexian = 200;
	
	/**
	 * 称重设置
	 */
	public static final int type_weight = 300;
	
	/**
	 * 打印机usb
	 */
	public static final int print_type_usb = 1;
	/**
	 * 打印机串口
	 */
	public static final int print_type_chuankou = 2;

	/**
	 * 1=打印机设置，2=客显设置
	 */
	@Id
	private int type_print_kexian;
	/**
	 * 打印机类型，1=usb,2=串口
	 */
	private int print_type=1;
	/**
	 * 串口号
	 */
	private String device;
	/**
	 * 波特率
	 */
	private int baudrate;

	// 备用字段
	private String setting1;
	private String setting2;
	private String setting3;

	public int getType_print_kexian() {
		return type_print_kexian;
	}

	public void setType_print_kexian(int type_print_kexian) {
		this.type_print_kexian = type_print_kexian;
	}

	public int getPrint_type() {
		return print_type;
	}

	public void setPrint_type(int print_type) {
		this.print_type = print_type;
	}

	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}

	public int getBaudrate() {
		return baudrate;
	}

	public void setBaudrate(int baudrate) {
		this.baudrate = baudrate;
	}

	public String getSetting1() {
		return setting1;
	}

	public void setSetting1(String setting1) {
		this.setting1 = setting1;
	}

	public String getSetting2() {
		return setting2;
	}

	public void setSetting2(String setting2) {
		this.setting2 = setting2;
	}

	public String getSetting3() {
		return setting3;
	}

	public void setSetting3(String setting3) {
		this.setting3 = setting3;
	}

	public PrintAndKexianDevice(int type_print_kexian, int print_type, String device, int baudrate) {
		super();
		this.type_print_kexian = type_print_kexian;
		this.print_type = print_type;
		this.device = device;
		this.baudrate = baudrate;
	}

	public PrintAndKexianDevice() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * 返回当前打印机类型
	 * 
	 * @return
	 */
	public String getPintTypeString() {
		String str = null;
		if (print_type == print_type_usb) {
			str = "USB";
		} else {
			str = "串口";
		}
		return str;
	}
}
